NCFS-Pack
A generic (astro)particle physics analysis framework
 
Loading...
Searching...
No Matches
NcVeto.cxx
Go to the documentation of this file.
1
31
33
58
59#include "NcVeto.h"
60#include "Riostream.h"
61
62ClassImp(NcVeto); // Class implementation to enable ROOT I/O
63
73
82
84{
90}
91
92void NcVeto::StoreVetoLevel(NcEvent* evt,Double_t level)
93{
109
110 if (!evt) return;
111
112 NcDevice* veto=evt->GetDevice("NcVeto");
113
114 if (veto)
115 {
116 veto->AddNamedSlot("VetoLevel"); // To make sure the slot exists
117 veto->SetSignal(level,"VetoLevel");
118 }
119 else
120 {
121 NcVeto params;
122 params.SetNameTitle("NcVeto","Event veto processor result");
123 params.AddNamedSlot("VetoLevel");
124 params.SetSignal(level,"VetoLevel");
125
126 evt->AddDevice(params);
127 }
128}
129
130TObject* NcVeto::Clone(const char* name) const
131{
144
145 NcVeto* v=new NcVeto(*this);
146 if (name)
147 {
148 if (strlen(name)) v->SetName(name);
149 }
150 return v;
151}
152
ClassImp(NcVeto)
void AddNamedSlot(TString s)
NcDevice(const char *name="", const char *title="")
Definition NcDevice.cxx:109
Creation and investigation of an NCFS generic event structure.
Definition NcEvent.h:15
void AddDevice(NcDevice &d)
Definition NcEvent.cxx:1210
NcDevice * GetDevice(Int_t i) const
Definition NcEvent.cxx:1380
virtual void SetSignal(Double_t sig, Int_t j=1)
Definition NcSignal.cxx:516
NcDevice derived class to serve as a generic interface for event vetoing procedures.
Definition NcVeto.h:12
virtual TObject * Clone(const char *name="") const
Definition NcVeto.cxx:130
NcVeto()
Definition NcVeto.cxx:65
void StoreVetoLevel(NcEvent *evt, Double_t level)
Definition NcVeto.cxx:92
virtual ~NcVeto()
Definition NcVeto.cxx:74