How to assign a value to a variable manually?

I am using Form() to allow me to manually select which files I want to load.
ie:
void main(Int_t Hist1){

TFile::Open(Form(“ThisFile_%d”,Hist1));

}

I have to scale the data in each file by a file dependent factor. Can I use Form() to do this?

I was trying to do:

void main(Int_t File1, Double_t Scalar){
TFile::Open(Form(“ThisFile_%d”,File1));
Double_t x = Form("%f",Scalar);
}
but this returns an error that it cannot assign Int to a rvalue of char*? (Idk what the error means).

Any advice?

Double_t x = Scalar;
1 Like

That was a lot easier than I thought it would be. Thanks!