Message: Can I ignore the output from Thread ID -1 Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Can I ignore the output from Thread ID -1  

Forum: Multithreading
Date: 16 Oct, 2014
From: <padraig.looney@nhs.net>

I've created my own AnalysisManager to create an image. I am using multithreading. I call the method below at the end of the run. The output file has the thread ID in it. For each thread there should be an output file but I get an extra file with the thread ID -1. Is it safe for me to ignore this and what is the origin of this file?

    void AnalysisImageManager::writeImages(G4String dir) const{

    G4int threadID = G4Threading::G4GetThreadId();

    std::ostringstream convert;
    convert << threadID;
    std::string prefix = convert.str();
    const unsigned int shape[] = {widthPixel,heightPixel};

    G4String string = dir + "/" + prefix + "_Compton.npy";
    cnpy::npy_save(string,imageCompton->data(),shape,2,"w");

    string = dir + "/" + prefix + "_Photo.npy";
    cnpy::npy_save(string,imagePhoto->data(),shape,2,"w");

    string = dir + "/" + prefix + "_Prim.npy";
    cnpy::npy_save(string,imagePrimary->data(),shape,2,"w");

    }

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 Idea: Re: Can I ignore the output from Thread ID -1   (Andrea Dotti - 16 Oct, 2014)
 Add Message Add Message
to: "Can I ignore the output from Thread ID -1 "

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews