Create plot directory if it doesn't exist.
This commit is contained in:
@ -12,6 +12,7 @@
|
||||
|
||||
#include <fstream>
|
||||
#include <iomanip>
|
||||
#include <sys/stat.h>
|
||||
|
||||
struct GainMaps
|
||||
{
|
||||
@ -48,6 +49,10 @@ int main(int argc, char* argv[]) {
|
||||
timeinfo = localtime(&rawtime);
|
||||
strftime(date,80,"%Y-%m-%d",timeinfo);
|
||||
|
||||
// create plot directory with permissions drwxrwxr-x
|
||||
sprintf(savename,"plots/M%s/Calib_%s", module_str.c_str(), date);
|
||||
mkdir(savename, S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
|
||||
|
||||
// CuFluo HG0 dataset
|
||||
sprintf(savename,"data/M%s/CuFluo_gain_HG0_M%s.root", module_str.c_str(), module_str.c_str());
|
||||
TFile* FL_HG0_file = new TFile((char*)savename,"READ");
|
||||
|
Reference in New Issue
Block a user