41 size_t largest =
fData.size();
42 std::cout <<
"------ EPICS " << largest <<
" Varibles Found ------" << std::endl;
45 std::array<char, 20> buff;
48 strftime(buff.data(), buff.size(),
"%b %d %H:%M:%S", timeInfo);
50 std::cout <<
" DaqTimeStamp: " << buff.data() << std::endl;
51 std::cout <<
" DaqId: " <<
fDaqId << std::endl;
52 for(
size_t i = 0; i < largest; i++) {
53 std::cout << std::setw(3) << i <<
": ";
54 std::cout << std::setw(30) <<
fName.at(i) <<
" --- ";
55 std::cout <<
fData.at(i);
56 std::cout << std::endl;
69 }
catch(
const std::out_of_range& oor) {
70 std::cout <<
DRED <<
"Could not find variable at position " << index <<
", returning nothing" << std::endl;
79 std::cout << idx++ <<
": " << name << std::endl;
86 for(
const auto& name : names) {
94 std::cout <<
DRED <<
"Could not build map from tree" <<
RESET_COLOR << std::endl;
99 if(tree->SetBranchAddress(
"TEpicsFrag", &my_frag) == 0) {
100 for(
int i = 0; i < tree->GetEntries(); ++i) {
109 std::cout <<
DRED <<
"Could not build map from tree" <<
RESET_COLOR << std::endl;
115 TTree* scaler_tree =
static_cast<TTree*
>(gDirectory->Get(
"EpicsTree"));
116 if(scaler_tree ==
nullptr) {
128 std::cout <<
DRED <<
"Could not build the epics map" <<
RESET_COLOR << std::endl;
135 return &((--(
fScalerMap.upper_bound(time)))->second);
143 std::cout <<
DRED <<
"Could not build the epics map" <<
RESET_COLOR << std::endl;
148 std::cout << item.first <<
" " << item.second.fDaqTimeStamp << std::endl;
static void SetEpicsNameList(const std::vector< std::string > &names)
static std::map< Long64_t, TEpicsFrag > fScalerMap
void Print(Option_t *opt="") const override
!
static void BuildScalerMap()
static void PrintVariableNames()
void Clear(Option_t *opt="") override
!
static std::vector< std::string > fNameList
std::vector< std::string > fName
The name of the scaler.
static Long64_t fSmallestTime
static void PrintScalerMap()
std::vector< float > fData
The data in the scaler.
static std::string GetEpicsVariableName(const int &index)
static void AddEpicsVariable(const char *name)
static TEpicsFrag * GetScalerAtTime(Long64_t time)