gtouchable
Loading...
Searching...
No Matches
gtouchable_example.cc
Go to the documentation of this file.
1// gtouchable
2#include "gtouchable.h"
4
5// gemc
6#include "glogger.h"
7
8using std::string;
9using std::vector;
10
11int main(int argc, char* argv[]) {
12 auto gopts = std::make_shared<GOptions>(argc, argv, gtouchable::defineOptions());
13 auto log = std::make_shared<GLogger>(gopts, SFUNCTION_NAME, TOUCHABLE_LOGGER); // duplicate a touchable logger
14
15 auto a_ctof_gtouchable = GTouchable(gopts, "readout", "sector: 5, paddle: 5", {10.0, 20.0, 30.0});
16
17 for (unsigned i = 1; i < 10; i++) {
18 GTouchable ctof = *GTouchable::create(log);
19
20 bool is_equal = ctof == a_ctof_gtouchable;
21
22 log->info(" GTouchable: ", ctof, " is equal: ", is_equal ? "true" : "false");
23 }
24
25
26 return EXIT_SUCCESS;
27}
Represents a touchable sensitive detector element.
Definition gtouchable.h:103
static std::shared_ptr< GTouchable > create(const std::shared_ptr< GOptions > &gopt)
Definition gtouchable.h:227
int main(int argc, char *argv[])
constexpr const char * TOUCHABLE_LOGGER
GOptions defineOptions()