AliPhysics  2c6b7ad (2c6b7ad)
AliEmcalFastOrMonitorTask.h
Go to the documentation of this file.
1 /**************************************************************************************
2  * Copyright (C) 2017, Copyright Holders of the ALICE Collaboration *
3  * All rights reserved. *
4  * *
5  * Redistribution and use in source and binary forms, with or without *
6  * modification, are permitted provided that the following conditions are met: *
7  * * Redistributions of source code must retain the above copyright *
8  * notice, this list of conditions and the following disclaimer. *
9  * * Redistributions in binary form must reproduce the above copyright *
10  * notice, this list of conditions and the following disclaimer in the *
11  * documentation and/or other materials provided with the distribution. *
12  * * Neither the name of the <organization> nor the *
13  * names of its contributors may be used to endorse or promote products *
14  * derived from this software without specific prior written permission. *
15  * *
16  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND *
17  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED *
18  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE *
19  * DISCLAIMED. IN NO EVENT SHALL ALICE COLLABORATION BE LIABLE FOR ANY *
20  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES *
21  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; *
22  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND *
23  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT *
24  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS *
25  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *
26  **************************************************************************************/
27 #ifndef ALIEMCALFASTORMONITORTASK_H
28 #define ALIEMCALFASTORMONITORTASK_H
29 
30 #include "AliAnalysisTaskSE.h"
31 #include "AliEMCALTriggerDataGrid.h"
32 #include <TString.h>
33 
34 class AliEMCALGeometry;
35 class AliOADBContainer;
36 class THistManager;
37 
42 namespace PWG {
43 
49 namespace EMCAL {
50 
74 public:
75 
82 
87  AliEmcalFastOrMonitorTask(const char *name);
88 
93 
101  void SetRequestTrigger(ULong_t triggerbits, TString triggerstring = "") {
102  fRequestTrigger = triggerbits;
103  fTriggerPattern = triggerstring;
104  }
105 
112  void AddMaskedFastor(int fastorID){ fMaskedFastors.push_back(fastorID); }
113 
118  void DefineMaskedFastorOADB(const char *oadbname) { fNameMaskedFastorOADB = oadbname; }
119 
124  void DefineMaskedCellOADB(const char *oadbname) { fNameMaskedCellOADB = oadbname; }
125 
126 protected:
127 
134  virtual void UserCreateOutputObjects();
135 
147  virtual void UserExec(Option_t *);
148 
157  virtual void ExecOnce();
158 
168  virtual void RunChanged(Int_t newrun);
169 
177  Double_t GetTransverseTimeSum(Int_t fastorAbsID, Double_t adc, const Double_t *vtx) const;
178 
187  void LoadEventCellData();
188 
190  AliEMCALGeometry *fGeom;
193 
196 
198  std::vector<int> fMaskedFastors;
199  std::vector<int> fMaskedCells;
200 
203  AliOADBContainer *fMaskedFastorOADB;
204  AliOADBContainer *fMaskedCellOADB;
205 
207  ClassDef(AliEmcalFastOrMonitorTask, 1);
209 };
210 
211 } /* namespace EMCAL */
212 
213 } /* namespace PWG */
214 
215 #endif /* ALIEMCALFASTORMONITORTASK_H */
Bool_t fLocalInitialized
Switch whether task is initialized (for ExecOnce)
virtual void UserExec(Option_t *)
Event loop.
Double_t GetTransverseTimeSum(Int_t fastorAbsID, Double_t adc, const Double_t *vtx) const
Calculate transverse L1 time sum of a FastOR.
double Double_t
Definition: External.C:58
void SetRequestTrigger(ULong_t triggerbits, TString triggerstring="")
Define trigger selection.
std::vector< int > fMaskedCells
List of masked cells.
Int_t fOldRun
Old Run (for RunChanged())
TString fNameMaskedFastorOADB
Name of the OADB container with masked fastors.
ULong_t fRequestTrigger
Trigger selection bits.
THistManager * fHistos
! Histogram handler
std::vector< int > fMaskedFastors
List of masked fastors.
Namespace for EMCAL framework classes and task.
int Int_t
Definition: External.C:63
AliOADBContainer * fMaskedFastorOADB
! OADB container with masked fastors
AliEMCALTriggerDataGrid< double > fCellData
Grid with summed cell data.
AliEMCALGeometry * fGeom
! EMCAL Geometry object
TString fNameMaskedCellOADB
Name of the OADB container with masked cells.
unsigned long ULong_t
Definition: External.C:38
Namespace for PWG framework classes.
virtual void UserCreateOutputObjects()
Creating output objects.
virtual void ExecOnce()
Initialization of the task.
void DefineMaskedCellOADB(const char *oadbname)
Specify location of the OADB container with masked cells.
Container class for histograms.
Definition: THistManager.h:99
void LoadEventCellData()
Load event-dependent cell data.
void DefineMaskedFastorOADB(const char *oadbname)
Specify location of the OADB container with masked FastORs.
const char Option_t
Definition: External.C:48
AliOADBContainer * fMaskedCellOADB
! OADB container with masked cells
virtual void RunChanged(Int_t newrun)
Run-dependent setup of the task.
bool Bool_t
Definition: External.C:53
TString fTriggerPattern
Trigger string pattern used in addition to the trigger selection bits.
void AddMaskedFastor(int fastorID)
Add masked fastor to the list of masked fastors.
Simlple monitoring of EMCAL FastOr quantities.