forked from kvtsang/Supera
-
Notifications
You must be signed in to change notification settings - Fork 0
/
LArCVMetaMaker.h
68 lines (51 loc) · 2.07 KB
/
LArCVMetaMaker.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
////////////////////////////////////////////////////////////////////////
//
// LArCVMetaMaker.h
//
////////////////////////////////////////////////////////////////////////
#ifndef LARCVMETAMAKER_H
#define LARCVMETAMAKER_H
#include "fhiclcpp/ParameterSet.h"
#include "fhiclcpp/make_ParameterSet.h"
#include "art/Framework/Services/Registry/ActivityRegistry.h"
#include "art/Framework/Services/Registry/ServiceHandle.h"
#include "art/Framework/Services/Registry/ServiceMacros.h"
#include "art/Framework/Principal/Run.h"
#include "art/Framework/Principal/Event.h"
#include "art/Framework/Principal/Handle.h"
#include "canvas/Persistency/Common/Ptr.h"
#include "canvas/Persistency/Common/PtrVector.h"
#include "LArCVMetaData.h"
namespace util{
class LArCVMetaMaker {
public:
LArCVMetaMaker(fhicl::ParameterSet const& pset, art::ActivityRegistry& reg);
~LArCVMetaMaker(){};
public:
/// Re-configure the service module
void reconfigure(fhicl::ParameterSet const& pset);
/// Function to be executed @ run boundary
void preBeginRun(art::Run const& run);
void postBeginRun(art::Run const& run);
/// Function to be executed @ event boundary
void preProcessEvent(const art::Event& evt);
void postProcessEvent(const art::Event& evt);
/// Function to be executed @ file open
void preOpenFile(const std::string& filename);
void postOpenFile(const std::string& filename);
void postBeginJob();
void postEndJob();
std::string GetContent(std::string stream_name) const;
void addJson(const std::string fname, const std::string strm) { _json_v.push_back(fname + ".json"); _stream_v.push_back(strm); }
protected:
bool _quiet;
std::vector<std::string> _json_v;
std::vector<std::string> _stream_v;
::larcv::sam::FCLMetaData_t _fcl_meta;
::larcv::sam::UBMetaData_t _ub_meta;
::larcv::sam::FileCatalogMetaData_t _fcat_meta;
::larcv::sam::SAMBuiltInMetaData_t _sam_meta;
}; // class LArCVMetaMaker
} //namespace utils
DECLARE_ART_SERVICE(util::LArCVMetaMaker, LEGACY)
#endif