ATLAS Offline Software
Loading...
Searching...
No Matches
CTPFilesLoader.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
6//
7//NAME: CTPFilesLoader.h
8//PACKAGE: TrigConfStorage
9//
10//AUTHOR: J.Haller (CERN) Johannes.Haller@cern.ch
11//CREATED: 16. Dec. 2005
12//
13//PURPOSE:
14//
15//
17
18#ifndef TrigConf_CTPFilesLoader
19#define TrigConf_CTPFilesLoader
20
21#include <string>
22#include <sstream>
23#include <iostream>
24#include <vector>
25#include <sys/types.h>
26
29
30namespace TrigConf {
31
33 class CTPFilesLoader : virtual public ICTPFilesLoader, public DBLoader {
34 public:
35
42 CTPFilesLoader( StorageMgr& sm, coral::ISessionProxy& session)
43 : DBLoader("CTPFilesLoader", sm, session) {}
44
46 virtual ~CTPFilesLoader() override = default;
47
48 virtual bool load( CTPFiles& data) override;
49
50 private:
51
55
56 int getMenuIdFromMaster(int mid);
57 long getFilesIdFromMenu(int mid);
58 long getSmxIdFromMenu(int mid);
59 void parseHexString(std::vector<u_int>& vec, const std::string& str, bool verbose=false);
60
61 // template function to convert strings to integral data types
62 template <class T>
63 bool convert_hex_string(T& t, const std::string& s)
64 {
65 std::istringstream iss(s);
66 return !(iss >> std::hex >> t).fail();
67 }
68
69 // template function to convert strings to integral data types
70 template <class T>
71 bool convert_string(T& t, const std::string& s)
72 {
73 std::istringstream iss(s);
74 return !(iss >> t).fail();
75 }
76
77 };
78}
79
80#endif
81
82
std::vector< size_t > vec
char data[hepevt_bytes_allocation_ATLAS]
Definition HepEvt.cxx:11
bool convert_string(T &t, const std::string &s)
bool loadCtpcoreData(CTPFiles &)
virtual ~CTPFilesLoader() override=default
destructor
bool convert_hex_string(T &t, const std::string &s)
CTPFilesLoader(StorageMgr &sm, coral::ISessionProxy &session)
constructor
virtual bool load(CTPFiles &data) override
bool loadCtpinData(CTPFiles &)
void parseHexString(std::vector< u_int > &vec, const std::string &str, bool verbose=false)
bool loadCtpmonData(CTPFiles &)
virtual int verbose() const override
Definition DBLoader.h:57
DBLoader(StorageMgr &sm, coral::ISessionProxy &session)
constructor
Definition DBLoader.cxx:30
Database Storage Manager, controls the database session and the different loader classes for DB acces...
Definition StorageMgr.h:23
Forward iterator to traverse the main components of the trigger configuration.
Definition Config.h:22