PandaRoot
PndGemMonitor.h
Go to the documentation of this file.
1 //****************************************************************************
2 //* This file is part of PandaRoot. *
3 //* *
4 //* PandaRoot is distributed under the terms of the *
5 //* GNU General Public License (GPL) version 3, *
6 //* copied verbatim in the file "LICENSE". *
7 //* *
8 //* Copyright (C) 2006 - 2024 FAIR GmbH and copyright holders of PandaRoot *
9 //* The copyright holders are listed in the file "COPYRIGHTHOLDERS". *
10 //* The authors are listed in the file "AUTHORS". *
11 //****************************************************************************
12 
13 //* $Id: */
14 
15 // -------------------------------------------------------------------------
16 // ----- PndGemMonitor header file -----
17 // ----- Created 10/04/2013 by R. Karabowicz -----
18 // -------------------------------------------------------------------------
19 
28 #ifndef PNDGEMMONITOR_H
29 #define PNDGEMMONITOR_H
30 
31 #include <TVector2.h>
32 #include <TArrayD.h>
33 #include <TMath.h>
34 #include <TGeoManager.h>
35 
36 #include "FairRun.h"
37 #include "FairRuntimeDb.h"
38 #include "FairTask.h"
39 #include "PndGemSensor.h"
40 #include "PndGemSensorMonitor.h"
41 #include "PndGemDigi.h"
42 #include "PndGemCluster.h"
43 
44 #include <map>
45 
47 class PndGemMonitor : public FairTask {
48  public:
49  PndGemMonitor();
50 
51  static PndGemMonitor *Instance();
52 
53  static void Destroy()
54  {
55  if (fInstance) {
56  delete fInstance;
57  fInstance = nullptr;
58  }
59  }
60 
61  virtual ~PndGemMonitor(){};
62 
63  Double_t ChannelLastActiveAt(Int_t statNr, Int_t sensNr, Int_t sideId, Int_t chanNr);
64  Int_t CreateSensorMonitor(const PndGemSensor &tempSensor);
65  void EnableDigi(Int_t eventNr, Int_t digiNr, PndGemDigi *tempDigi);
66  void EnableCluster(Int_t eventNr, Int_t clusterNr, PndGemCluster *tempCluster);
67 
68  void Print();
69 
70  private:
71  static PndGemMonitor *fInstance;
72  PndGemMonitor(PndGemMonitor &) : FairTask() // gm //[R.K.03/2017] unused variable(s)
73  {
74  }
75 
76  TGeoManager *fGeoMan;
77  FairRuntimeDb *fRtdb;
78 
79  TObjArray *fSensorList;
80  std::map<std::pair<Int_t, Int_t>, Int_t> fSensorMap;
82  ClassDef(PndGemMonitor, 1);
83 };
84 
85 #endif
Int_t CreateSensorMonitor(const PndGemSensor &tempSensor)
virtual ~PndGemMonitor()
Definition: PndGemMonitor.h:61
Double_t ChannelLastActiveAt(Int_t statNr, Int_t sensNr, Int_t sideId, Int_t chanNr)
void EnableDigi(Int_t eventNr, Int_t digiNr, PndGemDigi *tempDigi)
static void Destroy()
Definition: PndGemMonitor.h:53
void EnableCluster(Int_t eventNr, Int_t clusterNr, PndGemCluster *tempCluster)
Digitization Parameter Class for GEM part.
Definition: PndGemMonitor.h:47
static PndGemMonitor * Instance()