AliRoot Core  a565103 (a565103)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliMUONBusPatchEvolution Class Reference

Utility class to massage the output of the MCHBPEVO DA. More...

#include <AliMUONBusPatchEvolution.h>

Inheritance diagram for AliMUONBusPatchEvolution:

Public Member Functions

 AliMUONBusPatchEvolution (AliMergeableCollection &hc)
 
 AliMUONBusPatchEvolution (AliMergeableCollection &hc, const std::map< int, int > &nofPadsPerBusPatch)
 
void Augment ()
 
Bool_t GetFaultyBusPatches (int timeResolution, int requiredEvents, float occupancyThreshold, std::map< int, double > &faultyBusPatchOccupancies)
 
void GetTimeResolutions (std::vector< int > &timeResolutions)
 
void ShrinkTimeAxis ()
 

Static Public Member Functions

static TH1 * ExpandTimeAxis (const TH1 &h, Int_t expansionTime, Int_t timeResolution=-1)
 
static Bool_t GetTimeOffset (const TH1 &h, TTimeStamp &origin)
 

Private Member Functions

void ComputeNumberOfPads ()
 
Bool_t FillNumberOfPads ()
 
void GroupByStation (int timeResolution)
 
void GroupByChamber (int timeResolution)
 
void GroupByDDL (int timeResolution)
 
void GroupByDE (int timeResolution)
 
void Normalize ()
 
void NumberOfPadsFromHistosToMap (std::map< int, int > &nofPadsPerBusPatch)
 

Static Private Member Functions

static int GetTimeResolution (const TH1 &h)
 

Private Attributes

AliMergeableCollection & fBPEVO
 
std::map< int, int > fNofPads
 

Detailed Description

Utility class to massage the output of the MCHBPEVO DA.

This utility class can be used to perform two operations on the output of the MCHBPEVO DA (which is, on purpose, limited to the strict minimum) : extract alarm information from it, and augment it with derived information.

The GetListOfFaultyBusPatches() can be used to get the list of bus patches with an occupancy above a given threshold.

The Augment() method goes from the list of histograms (in the form of an AliMergeableCollection) describing the time evolution of the bus patches hit count, this class adds histograms to get the bus patches occupancy (=hit count / nevents / npads). Then the occupancy is also computed at different levels of the detector : detection element, DDL, chamber, station, in order to allow a global view of issues (if any)

Author
Laurent Aphecetche, Subatech

Definition at line 21 of file AliMUONBusPatchEvolution.h.

Constructor & Destructor Documentation

AliMUONBusPatchEvolution::AliMUONBusPatchEvolution ( AliMergeableCollection &  hc)

Definition at line 47 of file AliMUONBusPatchEvolution.cxx.

AliMUONBusPatchEvolution::AliMUONBusPatchEvolution ( AliMergeableCollection &  hc,
const std::map< int, int > &  nofPadsPerBusPatch 
)

Definition at line 54 of file AliMUONBusPatchEvolution.cxx.

Member Function Documentation

void AliMUONBusPatchEvolution::Augment ( )

From the list of histograms (in the form of an AliMergeableCollection) describing the time evolution of the bus patches hit count, this class adds histograms to get the bus patches occupancy (=hit count / nevents / npads). Then the occupancy is also computed at different levels of the detector : detection element, DDL, chamber, station, in order to allow a global view of issues (if any)

Definition at line 62 of file AliMUONBusPatchEvolution.cxx.

Referenced by BPEVO(), and AliMUONBusPatchEvolutionSubprocessor::Initialize().

void AliMUONBusPatchEvolution::ComputeNumberOfPads ( )
private

Compute the number of pads in each bus patch from the mapping

Definition at line 95 of file AliMUONBusPatchEvolution.cxx.

Referenced by AliMUONBusPatchEvolution().

TH1 * AliMUONBusPatchEvolution::ExpandTimeAxis ( const TH1 &  h,
Int_t  expansionTime,
Int_t  timeResolution = -1 
)
static

Extend (by increasing the number of bins) the time range of h by nbins if expansion < 0 expansion is from before the start of x-axis, otherwise from the end.

Must update the time offset

Definition at line 160 of file AliMUONBusPatchEvolution.cxx.

Referenced by AssertHistogramsRange().

Bool_t AliMUONBusPatchEvolution::FillNumberOfPads ( )
private

Fill histograms with the number of pads per element (BP, DE, DDL, chamber, station)

Definition at line 216 of file AliMUONBusPatchEvolution.cxx.

Referenced by Augment().

Bool_t AliMUONBusPatchEvolution::GetFaultyBusPatches ( int  timeResolution,
int  requiredEvents,
float  occupancyThreshold,
std::map< int, double > &  faultyBusPatchOccupancies 
)

Loop over all bus patches and compute their occupancy in the last nevents Return kFALSE if the number of required events was not reached

Definition at line 410 of file AliMUONBusPatchEvolution.cxx.

Referenced by ReportFaultyBusPatches().

Bool_t AliMUONBusPatchEvolution::GetTimeOffset ( const TH1 &  h,
TTimeStamp &  origin 
)
static

Assuming histogram h has a time axis, fills origin with its time offset and returns kTRUE. Otherwise returns kFALSE Assumes that the time offset is indicated in GMT

Definition at line 336 of file AliMUONBusPatchEvolution.cxx.

Referenced by AssertHistogramsRange(), and ExpandTimeAxis().

int AliMUONBusPatchEvolution::GetTimeResolution ( const TH1 &  h)
staticprivate
void AliMUONBusPatchEvolution::GetTimeResolutions ( std::vector< int > &  timeResolutions)
void AliMUONBusPatchEvolution::GroupByChamber ( int  timeResolution)
private

From the histograms at DE level, make the corresponding ones at chamber level with left and right separated as well.

Definition at line 512 of file AliMUONBusPatchEvolution.cxx.

Referenced by Augment().

void AliMUONBusPatchEvolution::GroupByDDL ( int  timeResolution)
private

From the histograms at DE level, make the corresponding ones at DDL level

Definition at line 576 of file AliMUONBusPatchEvolution.cxx.

Referenced by Augment().

void AliMUONBusPatchEvolution::GroupByDE ( int  timeResolution)
private

From the histograms at Bus Patch level (which is the original DA output) make the corresponding histograms at DE level

Definition at line 611 of file AliMUONBusPatchEvolution.cxx.

Referenced by Augment().

void AliMUONBusPatchEvolution::GroupByStation ( int  timeResolution)
private

From the histograms at chamber level, make the corresponding ones at station level

Definition at line 468 of file AliMUONBusPatchEvolution.cxx.

Referenced by Augment().

void AliMUONBusPatchEvolution::Normalize ( )
private

Definition at line 659 of file AliMUONBusPatchEvolution.cxx.

Referenced by Augment().

void AliMUONBusPatchEvolution::NumberOfPadsFromHistosToMap ( std::map< int, int > &  nofPadsPerBusPatch)
private
void AliMUONBusPatchEvolution::ShrinkTimeAxis ( )

remove unused bins (after the last used bin) in all histograms that have a time axis. Note that we assume that at this point the collection indeed contains only histograms that have time bins

Definition at line 743 of file AliMUONBusPatchEvolution.cxx.

Referenced by Augment(), and AliMUONBusPatchEvolutionSubprocessor::Initialize().

Member Data Documentation

AliMergeableCollection& AliMUONBusPatchEvolution::fBPEVO
private
std::map<int,int> AliMUONBusPatchEvolution::fNofPads
private

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