AliPhysics  608b256 (608b256)
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 "AliAnalysisTaskEmcal.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 
141  virtual bool IsEventSelected();
142 
154  virtual bool Run();
155 
164  virtual void UserExecOnce();
165 
175  virtual void RunChanged(Int_t newrun);
176 
184  Double_t GetTransverseTimeSum(Int_t fastorAbsID, Double_t adc, const Double_t *vtx) const;
185 
194  void LoadEventCellData();
195 
199 
202 
204  std::vector<int> fMaskedFastors;
205  std::vector<int> fMaskedCells;
206 
209  AliOADBContainer *fMaskedFastorOADB;
210  AliOADBContainer *fMaskedCellOADB;
211 
213  ClassDef(AliEmcalFastOrMonitorTask, 1);
215 };
216 
217 } /* namespace EMCAL */
218 
219 } /* namespace PWG */
220 
221 #endif /* ALIEMCALFASTORMONITORTASK_H */
Bool_t fLocalInitialized
Switch whether task is initialized (for ExecOnce)
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.
virtual void UserExecOnce()
Initialization of the task.
Base task in the EMCAL framework.
Int_t fOldRun
Old Run (for RunChanged())
TString fNameMaskedFastorOADB
Name of the OADB container with masked fastors.
ULong_t fRequestTrigger
Trigger selection bits.
std::vector< int > fMaskedFastors
List of masked fastors.
Namespace for EMCAL framework classes and task.
int Int_t
Definition: External.C:63
virtual bool IsEventSelected()
Perform event selection.
AliOADBContainer * fMaskedFastorOADB
! OADB container with masked fastors
AliEMCALTriggerDataGrid< double > fCellData
Grid with summed cell data.
TString fNameMaskedCellOADB
Name of the OADB container with masked cells.
unsigned long ULong_t
Definition: External.C:38
Namespace for PWG framework classes.
THistManager * fHistosQA
! Histogram handler
virtual void UserCreateOutputObjects()
Creating output objects.
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.
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.