15 #include "art_root_io/TFileService.h" 123 fTree = tfs->make<TTree>(
"RunList",
"RunList Information");
150 FlatTree = tfs->make<TTree>(
"FlatDigitTree",
"FlatDigitTree");
162 std::cout <<
"At the start of the run....going to reset all the variables. " <<
std::endl;
176 std::vector< art::Ptr< raw::RawDigit> > digits;
188 for (
unsigned int dig=0; dig<
DigSize; ++dig ) {
193 ADCVec.push_back ( digits[dig]->ADC(Samp) );
202 std::vector< art::Ptr< raw::ExternalTrigger> > trigs;
208 std::vector< art::Ptr< raw::OpDetWaveform> > waveforms;
214 std::vector< art::Ptr< recob::OpHit> > ophits;
218 bool RCEsPresent =
false;
220 bool WavePresent =
false;
234 for (
size_t dig=0; dig<digits.size(); ++dig) {
236 unsigned int Channel = digits[dig]->Channel();
237 double Pedestal = digits[dig]->GetPedestal();
238 for (
size_t samp=0; samp<digits[dig]->Samples(); ++samp)
239 AvADC += digits[dig]->ADC(samp);
240 AvADC = AvADC / digits[dig]->Samples();
243 if ( AvADC == 0 && Pedestal == 0)
245 for (
auto it = BadChannels.begin(); it != BadChannels.end(); it++) {
252 double ADCPedDiff = AvADC - Pedestal;
265 for (
size_t tr=0; tr<trigs.size(); ++tr) {
266 if (trigs[tr]->GetTrigID() < 100)
continue;
277 if (waveforms.size()) {
287 if (!RCEsPresent && !WavePresent) ++
EvJustSSPs;
298 std::cout <<
"At the end of the run, I am putting the following into the TTree:\n" std::vector< float > ADCVec
std::string fCounterModuleLabel
virtual ChannelSet_t BadChannels() const =0
Returns a copy of set of bad channel IDs for the current run.
EventNumber_t event() const
std::set< raw::ChannelID_t > ChannelSet_t
Type of set of channel IDs.
short unsigned int fMaxSamples
std::vector< int > MyUsefulChans
GoodRun(fhicl::ParameterSet const &p)
Definition of basic raw digits.
EDAnalyzer(fhicl::ParameterSet const &pset)
bool getByLabel(std::string const &label, std::string const &instance, Handle< PROD > &result) const
std::string fWaveformModuleLabel
#define DEFINE_ART_MODULE(klass)
void beginRun(const art::Run &r) override
Collect all the RawData header files together.
Class providing information about the quality of channels.
std::string fOpHitModuleLabel
void analyze(art::Event const &evt) override
void endRun(const art::Run &r) override
ChannelMappingService::Channel Channel
Interface for experiment-specific channel quality info provider.
std::string fRawDigitModuleLabel
auto const & get(AssnsNode< L, R, D > const &r)
void fill_ptr_vector(std::vector< Ptr< T >> &ptrs, H const &h)
Interface for experiment-specific service for channel quality info.
QTextStream & endl(QTextStream &s)
std::vector< int > ChanNum