ndmspc 0.20250304.0
Loading...
Searching...
No Matches
Ndmspc::Gitlab::Event Class Reference

Event object. More...

#include <GitlabEvent.h>

Inheritance diagram for Ndmspc::Gitlab::Event:

Public Member Functions

 Event ()
 
 Event (Long64_t id)
 
virtual ~Event ()
 
Long64_t GetID () const
 Event ID.
 
TDatime GetDateTime () const
 Event date and time.
 
void SetID (Long64_t id)
 
void SetTimeDate (Int_t year, Int_t month, Int_t day, Int_t hour, Int_t min, Int_t sec)
 
Long64_t GetNIssues () const
 
TrackGetIssue (Long64_t id)
 
TrackAddIssue ()
 
Long64_t GetNMergeRequests () const
 
TrackGetMergeRequest (Long64_t id)
 
TrackAddMergeRequest ()
 
TH1S * GetListOfAuthors () const
 Returns authors histogram.
 
TH1S * GetListOfProjects () const
 Returns projects histogram.
 
TH1S * GetListOfMilestones () const
 Returns milestones histogram.
 
void ShrinkMappingHistograms (bool verbose=true)
 Shrinks histogram.
 
bool FillGitlabFromJson (std::string issues, std::string mergrerequests)
 
bool FillIssuesFromJson (const json root)
 
bool FillMergeRequestsFromJson (const json root)
 
virtual void Print (Option_t *option="") const
 
virtual void Clear (Option_t *option="")
 

Private Member Functions

 Event (const Event &)
 Copy constructor.
 
Eventoperator= (const Event &)
 not implemented
 
std::string ParseProjectName (std::string in, char d='!') const
 not implemented
 
void ShrinkHistogram (const char *name, TH1 *h, bool verbose)
 

Private Attributes

Long64_t fID
 ID of event.
 
TDatime fDateTime
 Time of event.
 
Int_t fNIssues
 Number of Issues.
 
Int_t fNMergeRequests
 Number of MergeRequests.
 
TClonesArray * fIssues
 Array with all issues.
 
TClonesArray * fMergeRequests
 Array with all merge requests.
 
TH1S * fAuthors {nullptr}
 List of authors in current event.
 
TH1S * fProjects {nullptr}
 List of projects in current event.
 
TH1S * fMilestones {nullptr}
 List of milestones in current event.
 

Detailed Description

Event object.

Author
Martin Vala mvala.nosp@m.@cer.nosp@m.n.ch

Definition at line 21 of file GitlabEvent.h.

Constructor & Destructor Documentation

◆ Event() [1/2]

Ndmspc::Gitlab::Event::Event ( )

Default constructor

Definition at line 14 of file GitlabEvent.cxx.

◆ Event() [2/2]

Ndmspc::Gitlab::Event::Event ( Long64_t id)

A constructor

Definition at line 21 of file GitlabEvent.cxx.

References fAuthors, fIssues, fMergeRequests, fMilestones, and fProjects.

◆ ~Event()

Ndmspc::Gitlab::Event::~Event ( )
virtual

A destructor

Definition at line 35 of file GitlabEvent.cxx.

References fAuthors, fIssues, fMergeRequests, fMilestones, and fProjects.

Member Function Documentation

◆ AddIssue()

Track * Ndmspc::Gitlab::Event::AddIssue ( )

Adds Issue to event

Definition at line 48 of file GitlabEvent.cxx.

References fIssues, and fNIssues.

Referenced by FillIssuesFromJson().

◆ AddMergeRequest()

Track * Ndmspc::Gitlab::Event::AddMergeRequest ( )

Adds Merge requests to event

Definition at line 56 of file GitlabEvent.cxx.

References fMergeRequests, and fNMergeRequests.

Referenced by FillMergeRequestsFromJson().

◆ Clear()

void Ndmspc::Gitlab::Event::Clear ( Option_t * option = "")
virtual

Reseting event to default values and clear all tracks

Definition at line 189 of file GitlabEvent.cxx.

References fID, fIssues, fMergeRequests, fNIssues, and fNMergeRequests.

◆ FillGitlabFromJson()

bool Ndmspc::Gitlab::Event::FillGitlabFromJson ( std::string issues,
std::string mergrerequests )

Import gitlab info from json input

Definition at line 64 of file GitlabEvent.cxx.

References FillIssuesFromJson(), and FillMergeRequestsFromJson().

◆ FillIssuesFromJson()

◆ FillMergeRequestsFromJson()

◆ GetDateTime()

TDatime Ndmspc::Gitlab::Event::GetDateTime ( ) const
inline

Event date and time.

Returns
date and time

Definition at line 79 of file GitlabEvent.h.

References fDateTime.

◆ GetID()

Long64_t Ndmspc::Gitlab::Event::GetID ( ) const
inline

Event ID.

Returns
event ID

Definition at line 78 of file GitlabEvent.h.

References fID.

◆ GetIssue()

Track * Ndmspc::Gitlab::Event::GetIssue ( Long64_t id)
inline
Parameters
idTrack ID
Returns
Track with id

Definition at line 85 of file GitlabEvent.h.

References fIssues.

◆ GetListOfAuthors()

TH1S * Ndmspc::Gitlab::Event::GetListOfAuthors ( ) const
inline

Returns authors histogram.

Returns List of authors as TAxis.

Returns
Axis object

Definition at line 93 of file GitlabEvent.h.

References fAuthors.

◆ GetListOfMilestones()

TH1S * Ndmspc::Gitlab::Event::GetListOfMilestones ( ) const
inline

Returns milestones histogram.

Definition at line 97 of file GitlabEvent.h.

References fMilestones.

◆ GetListOfProjects()

TH1S * Ndmspc::Gitlab::Event::GetListOfProjects ( ) const
inline

Returns projects histogram.

Returns List of Projects as TAxis.

Returns
Axis object

Definition at line 95 of file GitlabEvent.h.

References fProjects.

◆ GetMergeRequest()

Track * Ndmspc::Gitlab::Event::GetMergeRequest ( Long64_t id)
inline
Parameters
idTrack ID
Returns
Track with id

Definition at line 89 of file GitlabEvent.h.

References fMergeRequests.

◆ GetNIssues()

Long64_t Ndmspc::Gitlab::Event::GetNIssues ( ) const
inline
Returns
number of tracks

Definition at line 84 of file GitlabEvent.h.

References fNIssues.

◆ GetNMergeRequests()

Long64_t Ndmspc::Gitlab::Event::GetNMergeRequests ( ) const
inline
Returns
number of tracks

Definition at line 88 of file GitlabEvent.h.

References fNMergeRequests.

◆ ParseProjectName()

std::string Ndmspc::Gitlab::Event::ParseProjectName ( std::string in,
char d = '!' ) const
private

not implemented

Returns
Parsed project name

Parse project name

Definition at line 211 of file GitlabEvent.cxx.

Referenced by FillIssuesFromJson(), and FillMergeRequestsFromJson().

◆ Print()

void Ndmspc::Gitlab::Event::Print ( Option_t * option = "") const
virtual

Printing event info

Definition at line 160 of file GitlabEvent.cxx.

References fID, fNIssues, and fNMergeRequests.

◆ SetID()

void Ndmspc::Gitlab::Event::SetID ( Long64_t id)
inline
Parameters
idEvent ID

Sets event ID

Definition at line 81 of file GitlabEvent.h.

References fID.

◆ SetTimeDate()

void Ndmspc::Gitlab::Event::SetTimeDate ( Int_t year,
Int_t month,
Int_t day,
Int_t hour,
Int_t min,
Int_t sec )
Parameters
yearYear of event
monthMonth of event
dayDay of event
hourHour of event
minMinute of event
secSecond of event

Sets Date and time of event

Sets Date and time of event

Definition at line 203 of file GitlabEvent.cxx.

References fDateTime.

◆ ShrinkHistogram()

void Ndmspc::Gitlab::Event::ShrinkHistogram ( const char * name,
TH1 * h,
bool verbose )
private

Shrink histogram

Definition at line 222 of file GitlabEvent.cxx.

Referenced by ShrinkMappingHistograms().

◆ ShrinkMappingHistograms()

void Ndmspc::Gitlab::Event::ShrinkMappingHistograms ( bool verbose = true)

Shrinks histogram.

Shrink mapping histograms

Definition at line 179 of file GitlabEvent.cxx.

References fAuthors, fMilestones, fProjects, and ShrinkHistogram().

Member Data Documentation

◆ fAuthors

TH1S* Ndmspc::Gitlab::Event::fAuthors {nullptr}
private

List of authors in current event.

Definition at line 119 of file GitlabEvent.h.

Referenced by Event(), FillIssuesFromJson(), FillMergeRequestsFromJson(), GetListOfAuthors(), ShrinkMappingHistograms(), and ~Event().

◆ fDateTime

TDatime Ndmspc::Gitlab::Event::fDateTime
private

Time of event.

Definition at line 110 of file GitlabEvent.h.

Referenced by GetDateTime(), and SetTimeDate().

◆ fID

Long64_t Ndmspc::Gitlab::Event::fID
private

ID of event.

Definition at line 109 of file GitlabEvent.h.

Referenced by Clear(), GetID(), Print(), and SetID().

◆ fIssues

TClonesArray* Ndmspc::Gitlab::Event::fIssues
private

Array with all issues.

Definition at line 115 of file GitlabEvent.h.

Referenced by AddIssue(), Clear(), Event(), GetIssue(), and ~Event().

◆ fMergeRequests

TClonesArray* Ndmspc::Gitlab::Event::fMergeRequests
private

Array with all merge requests.

Definition at line 117 of file GitlabEvent.h.

Referenced by AddMergeRequest(), Clear(), Event(), GetMergeRequest(), and ~Event().

◆ fMilestones

TH1S* Ndmspc::Gitlab::Event::fMilestones {nullptr}
private

List of milestones in current event.

Definition at line 121 of file GitlabEvent.h.

Referenced by Event(), FillIssuesFromJson(), FillMergeRequestsFromJson(), GetListOfMilestones(), ShrinkMappingHistograms(), and ~Event().

◆ fNIssues

Int_t Ndmspc::Gitlab::Event::fNIssues
private

Number of Issues.

Definition at line 111 of file GitlabEvent.h.

Referenced by AddIssue(), Clear(), GetNIssues(), and Print().

◆ fNMergeRequests

Int_t Ndmspc::Gitlab::Event::fNMergeRequests
private

Number of MergeRequests.

Definition at line 112 of file GitlabEvent.h.

Referenced by AddMergeRequest(), Clear(), GetNMergeRequests(), and Print().

◆ fProjects

TH1S* Ndmspc::Gitlab::Event::fProjects {nullptr}
private

List of projects in current event.

Definition at line 120 of file GitlabEvent.h.

Referenced by Event(), FillIssuesFromJson(), FillMergeRequestsFromJson(), GetListOfProjects(), ShrinkMappingHistograms(), and ~Event().


The documentation for this class was generated from the following files: