AliRoot Core  edcc906 (edcc906)
AliFMDBaseDA Class Reference

#include <AliFMDBaseDA.h>

Inheritance diagram for AliFMDBaseDA:

Classes

struct  Runner
 

Public Types

typedef TObjArray Array
 

Public Member Functions

 AliFMDBaseDA ()
 
 AliFMDBaseDA (const AliFMDBaseDA &baseDA)
 
 ~AliFMDBaseDA ()
 
AliFMDBaseDAoperator= (const AliFMDBaseDA &)
 
Bool_t Run (AliRawReader *fmdReader, Bool_t appendRun, Bool_t isBase=false)
 
void SetSaveDiagnostics (Bool_t save)
 
void SetDiagnosticsFilename (const TString &f)
 
void SetMakeSummaries (Bool_t save)
 
void SetRequiredEvents (Int_t nEvents)
 
void SetTryAll (Bool_t all=true)
 
Int_t GetRequiredEvents () const
 
const ArrayGetSummaries () const
 
Bool_t HasSeenDetector (UShort_t d) const
 

Protected Member Functions

virtual Bool_t OpenFiles (Bool_t appendRun=false)
 
virtual void CloseFiles ()
 
virtual void Init ()
 
virtual void FillChannels (AliFMDDigit *)
 
virtual void Analyse (UShort_t, Char_t, UShort_t, UShort_t)
 
virtual void WriteHeaderToFile ()
 
virtual void AddChannelContainer (Array *, UShort_t, Char_t, UShort_t, UShort_t)
 
virtual void AddSectorSummary (Array *, UShort_t, Char_t, UShort_t, UShort_t)
 
virtual void FinishEvent ()
 
virtual void Terminate (TFile *)
 
Int_t GetCurrentEvent () const
 
void Rotate (const char *base, int max) const
 
Int_t GetHalfringIndex (UShort_t, Char_t, UShort_t) const
 
Int_t GetPulseSize (UShort_t det, Char_t ring, UShort_t board)
 
Int_t GetPulseLength (UShort_t det, Char_t ring, UShort_t board)
 
TString GetDetectorPath (UShort_t det, Bool_t full=kTRUE) const
 
TString GetRingPath (UShort_t det, Char_t ring, Bool_t full=kTRUE) const
 
TString GetSectorPath (UShort_t det, Char_t ring, UShort_t sec, Bool_t full=kTRUE) const
 
TString GetStripPath (UShort_t det, Char_t ring, UShort_t sec, UShort_t str, Bool_t full=kTRUE) const
 
ArrayGetDetectorArray (UShort_t det)
 
ArrayGetRingArray (UShort_t det, Char_t ring)
 
ArrayGetSectorArray (UShort_t det, Char_t ring, UShort_t sector)
 
ArrayGetStripArray (UShort_t det, Char_t ring, UShort_t sector, UShort_t strip)
 
void WriteConditionsData (AliFMDRawReader *fmdReader)
 
void SetCurrentEvent (Int_t currentEvent)
 
virtual void InitContainer (TDirectory *dir)
 
TH2 * MakeSummaryHistogram (const char *prefix, const char *title, UShort_t det, Char_t ring)
 
virtual void MakeSummary (UShort_t, Char_t)
 
virtual Bool_t HaveEnough (Int_t nEvent) const
 
virtual UShort_t GetProgress (Int_t nEvent) const
 

Protected Attributes

TString fDiagnosticsFilename
 
std::ofstream fOutputFile
 
std::ofstream fConditionsFile
 
Bool_t fSaveHistograms
 
Bool_t fMakeSummaries
 
Array fDetectorArray
 
TArrayS fPulseSize
 
TArrayS fPulseLength
 
Bool_t fSeenDetectors [3]
 
UInt_t fNEventsPerDetector [3]
 
Int_t fRequiredEvents
 
Int_t fCurrentEvent
 
UInt_t fRunno
 
Array fSummaries
 
Bool_t fAll
 

Static Protected Attributes

static const UInt_t fgkBaseDDL = 3072
 

Detailed Description

Definition at line 39 of file AliFMDBaseDA.h.

Member Typedef Documentation

Definition at line 62 of file AliFMDBaseDA.h.

Constructor & Destructor Documentation

AliFMDBaseDA::AliFMDBaseDA ( )

Constructor

Definition at line 144 of file AliFMDBaseDA.cxx.

AliFMDBaseDA::AliFMDBaseDA ( const AliFMDBaseDA baseDA)

Copy constructor

Parameters
baseDA

Definition at line 169 of file AliFMDBaseDA.cxx.

AliFMDBaseDA::~AliFMDBaseDA ( )

Destructor

Definition at line 200 of file AliFMDBaseDA.cxx.

Member Function Documentation

virtual void AliFMDBaseDA::AddChannelContainer ( Array ,
UShort_t  ,
Char_t  ,
UShort_t  ,
UShort_t   
)
inlineprotectedvirtual

Add a strip container

Reimplemented in AliFMDPedestalDA, and AliFMDGainDA.

Definition at line 219 of file AliFMDBaseDA.h.

Referenced by InitContainer().

virtual void AliFMDBaseDA::AddSectorSummary ( Array ,
UShort_t  ,
Char_t  ,
UShort_t  ,
UShort_t   
)
inlineprotectedvirtual

Add summary(s) for sectors

Reimplemented in AliFMDPedestalDA, and AliFMDGainDA.

Definition at line 225 of file AliFMDBaseDA.h.

Referenced by InitContainer().

virtual void AliFMDBaseDA::Analyse ( UShort_t  ,
Char_t  ,
UShort_t  ,
UShort_t   
)
inlineprotectedvirtual

Analyse a single strip result

Reimplemented in AliFMDPedestalDA, and AliFMDGainDA.

Definition at line 211 of file AliFMDBaseDA.h.

Referenced by Run().

void AliFMDBaseDA::CloseFiles ( )
protectedvirtual

Close output files

Reimplemented in AliFMDPedestalDA.

Definition at line 232 of file AliFMDBaseDA.cxx.

Referenced by AliFMDPedestalDA::CloseFiles(), and Run().

virtual void AliFMDBaseDA::FillChannels ( AliFMDDigit )
inlineprotectedvirtual

Fill channels

Reimplemented in AliFMDPedestalDA, and AliFMDGainDA.

Definition at line 207 of file AliFMDBaseDA.h.

Referenced by Run().

virtual void AliFMDBaseDA::FinishEvent ( )
inlineprotectedvirtual

End of event

Reimplemented in AliFMDGainDA, and AliFMDPedestalDA.

Definition at line 230 of file AliFMDBaseDA.h.

Referenced by Run().

Int_t AliFMDBaseDA::GetCurrentEvent ( ) const
inlineprotected

Current event number

Returns

Definition at line 241 of file AliFMDBaseDA.h.

Referenced by AliFMDGainDA::FinishEvent(), Run(), and AliFMDGainDA::UpdatePulseAndADC().

AliFMDBaseDA::Array * AliFMDBaseDA::GetDetectorArray ( UShort_t  det)
protected

Definition at line 664 of file AliFMDBaseDA.cxx.

Referenced by AliFMDPedestalDA::GetChannel(), GetPulseLength(), and GetRingArray().

TString AliFMDBaseDA::GetDetectorPath ( UShort_t  det,
Bool_t  full = kTRUE 
) const
protected

Get the detector path in diagnositcs file

Parameters
detDetector number
fullIf true, return full path
Returns
Path to detector

Definition at line 124 of file AliFMDBaseDA.cxx.

Referenced by GetPulseLength(), GetRingPath(), and InitContainer().

Int_t AliFMDBaseDA::GetHalfringIndex ( UShort_t  det,
Char_t  ring,
UShort_t  board 
) const
protected

Ge the half-ring index

Parameters
UShort_t
Char_t
UShort_t
Returns

Definition at line 576 of file AliFMDBaseDA.cxx.

Referenced by AliFMDGainDA::AddChannelContainer(), AliFMDGainDA::FinishEvent(), GetCurrentEvent(), GetPulseLength(), GetPulseSize(), AliFMDGainDA::UpdatePulseAndADC(), and WriteConditionsData().

UShort_t AliFMDBaseDA::GetProgress ( Int_t  nEvent) const
protectedvirtual

Definition at line 255 of file AliFMDBaseDA.cxx.

Referenced by MakeSummary(), and Run().

Int_t AliFMDBaseDA::GetPulseLength ( UShort_t  det,
Char_t  ring,
UShort_t  board 
)
inlineprotected

Get number of events per pulse size

Parameters
detDetector number
ringRin identifier
boardBoard number
Returns
number of events per Pulse size

Definition at line 287 of file AliFMDBaseDA.h.

Int_t AliFMDBaseDA::GetPulseSize ( UShort_t  det,
Char_t  ring,
UShort_t  board 
)
inlineprotected

Get the pulse size

Parameters
detDetector number
ringRin identifier
boardBoard number
Returns
Pulse step size

Definition at line 272 of file AliFMDBaseDA.h.

Int_t AliFMDBaseDA::GetRequiredEvents ( ) const
inline

Get the number of required events

Returns
number of required events

Definition at line 127 of file AliFMDBaseDA.h.

Referenced by GetProgress(), HaveEnough(), and Run().

AliFMDBaseDA::Array * AliFMDBaseDA::GetRingArray ( UShort_t  det,
Char_t  ring 
)
protected

Definition at line 674 of file AliFMDBaseDA.cxx.

Referenced by AliFMDPedestalDA::GetChannel(), GetPulseLength(), and GetSectorArray().

TString AliFMDBaseDA::GetRingPath ( UShort_t  det,
Char_t  ring,
Bool_t  full = kTRUE 
) const
protected

Get the ring path in diagnositcs file

Parameters
detDetector number
ringRing identifier
fullIf true, return full path
Returns
Path to ring

Definition at line 103 of file AliFMDBaseDA.cxx.

Referenced by GetPulseLength(), GetSectorPath(), and InitContainer().

AliFMDBaseDA::Array * AliFMDBaseDA::GetSectorArray ( UShort_t  det,
Char_t  ring,
UShort_t  sector 
)
protected
TString AliFMDBaseDA::GetSectorPath ( UShort_t  det,
Char_t  ring,
UShort_t  sec,
Bool_t  full = kTRUE 
) const
protected

Get the sector path in diagnositcs file

Parameters
detDetector number
ringRing identifier
secSector number
fullIf true, return full path
Returns
Path to sector

Definition at line 81 of file AliFMDBaseDA.cxx.

Referenced by GetPulseLength(), GetStripPath(), and InitContainer().

AliFMDBaseDA::Array * AliFMDBaseDA::GetStripArray ( UShort_t  det,
Char_t  ring,
UShort_t  sector,
UShort_t  strip 
)
protected
TString AliFMDBaseDA::GetStripPath ( UShort_t  det,
Char_t  ring,
UShort_t  sec,
UShort_t  str,
Bool_t  full = kTRUE 
) const
protected

Get the strip path in diagnositcs file

Parameters
detDetector number
ringRing identifier
secSector number
strStrip number
fullIf true, return full path
Returns
Path to strip

Definition at line 58 of file AliFMDBaseDA.cxx.

Referenced by GetPulseLength(), and InitContainer().

const Array& AliFMDBaseDA::GetSummaries ( ) const
inline

Get list of summary histograms

Returns
Array of summary histograms or null if not defined

Definition at line 133 of file AliFMDBaseDA.h.

Referenced by PostSummaries().

Bool_t AliFMDBaseDA::HasSeenDetector ( UShort_t  d) const
inline

Check if we saw data for detector

Parameters
detDetector number to check
Returns
true if the code has seen data from the detector

Definition at line 403 of file AliFMDBaseDA.h.

Referenced by GetSummaries(), and PostSummaries().

Bool_t AliFMDBaseDA::HaveEnough ( Int_t  nEvent) const
protectedvirtual

Definition at line 242 of file AliFMDBaseDA.cxx.

Referenced by MakeSummary(), and Run().

virtual void AliFMDBaseDA::Init ( void  )
inlineprotectedvirtual

Initialize

Reimplemented in AliFMDPedestalDA, and AliFMDGainDA.

Definition at line 203 of file AliFMDBaseDA.h.

Referenced by AliFMDBaseDA::Runner::operator=(), and Run().

void AliFMDBaseDA::InitContainer ( TDirectory *  dir)
protectedvirtual

Initialize container

Parameters
dirDirectory to make containers in

Reimplemented in AliFMDGainDA.

Definition at line 427 of file AliFMDBaseDA.cxx.

Referenced by AliFMDGainDA::InitContainer(), Run(), and SetCurrentEvent().

virtual void AliFMDBaseDA::MakeSummary ( UShort_t  ,
Char_t   
)
inlineprotectedvirtual

Make a summary

Reimplemented in AliFMDGainDA, and AliFMDPedestalDA.

Definition at line 375 of file AliFMDBaseDA.h.

Referenced by Run().

TH2 * AliFMDBaseDA::MakeSummaryHistogram ( const char *  prefix,
const char *  title,
UShort_t  det,
Char_t  ring 
)
protected

Utility function for defining summary histograms

Parameters
detDetector
ringRing identifier
prefixHistogram prefix
titleHistogram title

Definition at line 636 of file AliFMDBaseDA.cxx.

Referenced by AliFMDPedestalDA::MakeSummary(), AliFMDGainDA::MakeSummary(), and SetCurrentEvent().

Bool_t AliFMDBaseDA::OpenFiles ( Bool_t  appendRun = false)
protectedvirtual

Open our output file

The output file is named

conditions.csv

and existing files are rotated, or

conditions_XXXXXXXXX.csv

in case the run number is to be appended.

Parameters
appendRunif true, append run number (9 digits, zero padded) to the output file name(s).
Returns
true on success

Reimplemented in AliFMDPedestalDA, and AliFMDGainDA.

Definition at line 212 of file AliFMDBaseDA.cxx.

Referenced by AliFMDGainDA::OpenFiles(), AliFMDPedestalDA::OpenFiles(), and Run().

AliFMDBaseDA& AliFMDBaseDA::operator= ( const AliFMDBaseDA )
inline

Definition at line 82 of file AliFMDBaseDA.h.

void AliFMDBaseDA::Rotate ( const char *  base,
int  max 
) const
protected

Rotate a set of files. base is the basic name of the files. If the file base.max exists it is removed. If the file base.n exists (where n < max) it is renamed to base.(n-1). If the file base exists, it is renamed to base.1

Parameters
baseBase name of the files
maxMaximum number to keep (minus one for the current).

Definition at line 596 of file AliFMDBaseDA.cxx.

Referenced by GetCurrentEvent(), AliFMDPedestalDA::InstallFile(), AliFMDGainDA::OpenFiles(), AliFMDPedestalDA::OpenFiles(), and OpenFiles().

Bool_t AliFMDBaseDA::Run ( AliRawReader *  fmdReader,
Bool_t  appendRun,
Bool_t  isBase = false 
)

Run this DA

Parameters
fmdReaderRaw input reader
appendRunAppend run number to files
isBaseTerminate after reading SOD

Definition at line 274 of file AliFMDBaseDA.cxx.

Referenced by AliFMDBaseDA::Runner::Exec(), main(), operator=(), TestGainDA(), and TestPedestalDA().

void AliFMDBaseDA::SetCurrentEvent ( Int_t  currentEvent)
inlineprotected

Set the current event

Parameters
currentEvent

Definition at line 354 of file AliFMDBaseDA.h.

Referenced by Run().

void AliFMDBaseDA::SetDiagnosticsFilename ( const TString &  f)
inline

Set the diagnostics file name

Parameters
fDiagnostics file name

Definition at line 102 of file AliFMDBaseDA.h.

Referenced by AliFMDBaseDA::Runner::Exec().

void AliFMDBaseDA::SetMakeSummaries ( Bool_t  save)
inline

Set whether to make summary histograms to be published to AMORE

Parameters
saveIf true, will generate summary QA histograms

Definition at line 108 of file AliFMDBaseDA.h.

Referenced by main().

void AliFMDBaseDA::SetRequiredEvents ( Int_t  nEvents)
inline

Set the number of requried events

Parameters
nEventsNumber of event we need

Definition at line 114 of file AliFMDBaseDA.h.

Referenced by AliFMDGainDA::Init(), and AliFMDPedestalDA::Init().

void AliFMDBaseDA::SetSaveDiagnostics ( Bool_t  save)
inline

Set whether to save diagnostics

Parameters
saveIf true, will output diagnostics file

Definition at line 96 of file AliFMDBaseDA.h.

Referenced by AliFMDBaseDA::Runner::Exec(), TestGainDA(), and TestPedestalDA().

void AliFMDBaseDA::SetTryAll ( Bool_t  all = true)
inline

Set whether we should try to get all detectors

Parameters
allIf true, try to get all detectors

Definition at line 120 of file AliFMDBaseDA.h.

Referenced by AliFMDBaseDA::Runner::Exec().

virtual void AliFMDBaseDA::Terminate ( TFile *  )
inlineprotectedvirtual

End of run

Reimplemented in AliFMDGainDA, and AliFMDPedestalDA.

Definition at line 234 of file AliFMDBaseDA.h.

Referenced by Run().

void AliFMDBaseDA::WriteConditionsData ( AliFMDRawReader fmdReader)
protected

Write conditions file

Parameters
fmdReaderRaw input

Definition at line 498 of file AliFMDBaseDA.cxx.

Referenced by GetPulseLength(), and Run().

virtual void AliFMDBaseDA::WriteHeaderToFile ( )
inlineprotectedvirtual

Write header to output file

Reimplemented in AliFMDPedestalDA, and AliFMDGainDA.

Definition at line 215 of file AliFMDBaseDA.h.

Referenced by Run().

Member Data Documentation

Bool_t AliFMDBaseDA::fAll
protected

Definition at line 396 of file AliFMDBaseDA.h.

Referenced by SetTryAll().

std::ofstream AliFMDBaseDA::fConditionsFile
protected

Definition at line 384 of file AliFMDBaseDA.h.

Referenced by OpenFiles(), and WriteConditionsData().

Int_t AliFMDBaseDA::fCurrentEvent
protected

Definition at line 393 of file AliFMDBaseDA.h.

Referenced by GetCurrentEvent(), and SetCurrentEvent().

Array AliFMDBaseDA::fDetectorArray
protected

Definition at line 387 of file AliFMDBaseDA.h.

Referenced by AliFMDBaseDA(), GetDetectorArray(), InitContainer(), OpenFiles(), and Run().

TString AliFMDBaseDA::fDiagnosticsFilename
protected
const UInt_t AliFMDBaseDA::fgkBaseDDL = 3072
staticprotected

Definition at line 380 of file AliFMDBaseDA.h.

Bool_t AliFMDBaseDA::fMakeSummaries
protected

Definition at line 386 of file AliFMDBaseDA.h.

Referenced by Run(), and SetMakeSummaries().

UInt_t AliFMDBaseDA::fNEventsPerDetector[3]
protected

Definition at line 391 of file AliFMDBaseDA.h.

Referenced by AliFMDBaseDA(), GetProgress(), HaveEnough(), and Run().

TArrayS AliFMDBaseDA::fPulseLength
protected
TArrayS AliFMDBaseDA::fPulseSize
protected
Int_t AliFMDBaseDA::fRequiredEvents
protected

Definition at line 392 of file AliFMDBaseDA.h.

Referenced by GetRequiredEvents(), and SetRequiredEvents().

Bool_t AliFMDBaseDA::fSaveHistograms
protected
Bool_t AliFMDBaseDA::fSeenDetectors[3]
protected
Array AliFMDBaseDA::fSummaries
protected

Definition at line 395 of file AliFMDBaseDA.h.

Referenced by AliFMDBaseDA(), GetSummaries(), MakeSummaryHistogram(), and Run().


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